From: Florian Müllner Date: Wed, 23 Feb 2011 14:16:18 +0000 (+0100) Subject: panel: Reposition corners on changes to the monitor layout X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8876 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ff171e365184f4651ef41d6b9886bf78a5f70ee0;p=gnome-shell.git panel: Reposition corners on changes to the monitor layout When the monitor layout changes, the panel might have been moved to another monitor, in which case the rounded corners need to be repositioned. https://bugzilla.gnome.org/show_bug.cgi?id=643064 --- diff --git a/js/ui/panel.js b/js/ui/panel.js index 6fa03473a..a38bf9aa1 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -560,7 +560,7 @@ PanelCorner.prototype = { this._side = side; this.actor = new St.DrawingArea({ style_class: 'panel-corner' }); this.actor.connect('repaint', Lang.bind(this, this._repaint)); - this.actor.connect('style-changed', Lang.bind(this, this._reposition)); + this.actor.connect('style-changed', Lang.bind(this, this.relayout)); }, _repaint: function() { @@ -623,7 +623,7 @@ PanelCorner.prototype = { cr.restore(); }, - _reposition: function() { + relayout: function() { let node = this.actor.get_theme_node(); let cornerRadius = node.get_length("-panel-corner-radius"); @@ -1063,6 +1063,9 @@ Panel.prototype = { this.actor.set_position(primary.x, primary.y); this.actor.set_size(primary.width, PANEL_HEIGHT); + + this._leftCorner.relayout(); + this._rightCorner.relayout(); }, _onTrayIconAdded: function(o, icon, role) {